<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
    String path = request.getContextPath();
			String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<title>填写冻结详情页面</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<!-- 当前页面样式 -->
<link rel="stylesheet" href="<s:url value="/css/common.css"/>" />
<!-- 当前页面样式 END -->

<script type="text/javascript"
	src="<s:url value="/js/jquery-1.9.1.js"/>"></script>
<script type="text/javascript" 
	src="<s:url value="/js/jquery.validate.min.js" />"></script>

<style type="text/css">
.error{color: red}
</style>
<script type="text/javascript">
$(function () {
	$("#queryUserForm").validate({
		//debug : false,
		submitHandler : function(form) {
			$("#queryBtn").attr("disabled",true);
			form.submit();
		},
		rules : {
			"merinfoStatusChange.detail" : {required : true},
		},
		messages : {
			"merinfoStatusChange.detail" : {required : "*必填"},
		},onsubmit : true,
		errorPlacement: function(error, element) {
			 error.appendTo(element.parent());  
		}
	});
	//返回
	$("#goBack").click(function(){
		 location.href = document.referrer;
	});
});
function textCounter(field, maxlimit) { 
	if (field.value.length > maxlimit){ 
		field.value = field.value.substring(0, maxlimit); 
	} 
 } 
</script>
</head>

<body>
<s:form id="queryUserForm" action="/formalMerinfo/freeze.ct" method="post" theme="simple">
<s:hidden name="merinfo.id"/>
<s:hidden name="merinfo.status"/>
	<table class="tb">
		<tbody>
			<tr class="tb-line bg-gray">
				<s:if test="merinfo.status==03">
					<td align="center" class="tb-td" colspan="3"><div class="tb-h2">冻结意见</div></td>
				</s:if>
				<s:elseif test="merinfo.status==01">
					<td align="center" class="tb-td" colspan="3"><div class="tb-h2">解冻意见</div></td>
				</s:elseif>
				<s:elseif test="merinfo.status==02">
					<td align="center" class="tb-td" colspan="3"><div class="tb-h2">注销意见</div></td>
				</s:elseif>
				
			<%-- 	<s:property value="merinfo.id" /> 
				<s:property value="merinfo.status" />  --%>
			</tr>
			<tr class="tb-line">
				<td align="right" class="tb-td" width="200">
					<div class="tb-h4">操作员</div>
				</td>
				<td align="left" class="tb-td" style="padding-left: 10px;"
					colspan="3">
					<s:property value="#request.operator" /> 
					
				</td>
			</tr>
			<s:if test="merinfo.status==01">
				<tr class="tb-line bg-gray">
					<td align="left" class="tb-td"  colspan=4>
					  <s:if test="#request.detail!=null ">
				    	 <tr class="tb-line  bg-gray">
				            <td class="tb-td" colspan="4" ><div class="tb-h3">冻结原因</div></td>
				        </tr>
				        <tr class="tb-line" align="center">
				        	<td class="tb-td" colspan="4">
				        		<table style="width:100%">
				        			<tr><td class="tb-td">商户号</td>
				        				<td class="tb-td">风控人员</td>
				        				<td class="tb-td">冻结原因</td>
				        				<td class="tb-td">冻结时间</td>
				        			</tr>
				        			 <s:iterator value="#request.detail" var="change">
				        			 	<tr>
					        				<td class="tb-td" >
								                <div class="tb-h4" ><s:property value="#change.mid"/></div>
								            </td>
								        	 <td class="tb-td" >
								                <div class="tb-h4"><s:property value="#change.agentName"/></div>
								            </td>
								            <td class="tb-td" >
								                <div class="tb-h4"><s:property value="#change.detail"/></div>
								            </td>
								            <td class="tb-td" style="width:210px;">
								                <div class="tb-h4"><s:property value="#change.createtime"/></div>
								            </td>
					        			</tr>
				        			 </s:iterator>
				        			
				        			 
				        		</table>
				            </td>
				        </tr>
				    </s:if>
					
				</td>
				</tr>
				
			</s:if>
			
			<tr class="tb-line">
				<td align="right" class="tb-td" width="200">
					<s:if test="merinfo.status==03">
						<div class="tb-h4">冻结意见：</div>
					</s:if>
					<s:elseif test="merinfo.status==01">
						<div class="tb-h4">解冻意见：</div>
					</s:elseif>
					<s:elseif test="merinfo.status==02">
						<div class="tb-h4">注销意见：</div>
					</s:elseif>
					
				</td>
				<td align="left" class="tb-td" style="padding-left: 10px;"
					colspan="3"><!-- onpropertychange="textCounter(this,100);" oninput="textCounter(this,100);" -->
					<s:textarea name="merinfoStatusChange.detail" cssStyle="width:80%;" onpropertychange="textCounter(this,80);" oninput="textCounter(this,80);"/>
				</td>
			</tr>
			   <tr class="tb-line">
            <td class="tb-td line-submit" align="right" colspan="3">
                <label class="tb-input-submit">
                	<s:if test="merinfo.status==03">
						 <input type="submit" value="冻结" id="queryBtn"/>
					</s:if>
					<s:elseif test="merinfo.status==01">
						 <input type="submit" value="解冻" id="queryBtn"/>
					</s:elseif>
					<s:elseif test="merinfo.status==02">
						 <input type="submit" value="注销" id="queryBtn"/>
					</s:elseif>
                </label>
                <label class="tb-input-submit">
                    <input type="button" id="goBack" value="返 回" onclick="go()"/>
                </label>
            </td>
        </tr>
		</tbody>
	</table>
	</s:form>
</body>
</html>
